<?php
namespace app\index\controller;

use app\common\controller\Front;

class Index extends Front
{
    public function index()
    {
        $items = [];
        foreach(array_column(config('navbar.'),'active') as $key=>$value){
            array_push($items,array_merge(config($value.'.'),['controll'=>$value]));
        }
        $this->site['title'] = config('site.title');
        $this->site['keywords'] = config('site.keywords');
        $this->site['description'] = config('site.description');
        $this->site['notice'] = config('index.notice');
        $this->assign('items',$items);
        $this->assign($this->site);
        return $this->fetch();
    }
}